package com.blog.backend.mapper;

import com.blog.backend.model.BlogPlate;
import com.blog.backend.req.PlateListReq;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BlogPlateMapper {
    int deleteByPrimaryKey(String plateId);

    int insert(BlogPlate record);

    int insertSelective(BlogPlate record);

    BlogPlate selectByPrimaryKey(String plateId);

    int updateByPrimaryKeySelective(BlogPlate record);

    int updateByPrimaryKey(BlogPlate record);

    /**
     * 查询该板块是否已经存在
     * @param plateName
     * @return
     */
    Integer selectByPlateName(@Param("plateName") String plateName);

    List<BlogPlate> selectList(@Param("req") PlateListReq req);

    BlogPlate selectDetailByName(@Param("plateName") String plateName);
}